<html>
<head>
	<meta charset="UTF-8">
	<title>购票网</title>
</head>
<body>
	<div id="app">
		<c_header></c_header>
		<c_menu></c_menu>
		<router-view></router-view>
		<c_footer></c_footer>
	</div>
</body>

<!-- vue -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- 组件http vue loader -->
<script src="https://unpkg.com/http-vue-loader"></script>
<!-- 路由router -->
<script src="https://cdn.staticfile.org/vue-router/2.7.0/vue-router.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

<script>

////////////////////////////
	//配置路由
	//1.定义路由组件
	//2.定义路由
	//3.创建router实例
	const router = new VueRouter({
			routes : [
				{ path: '/index',component: httpVueLoader('./component/c_index.vue')},
				{ path: '/ticket', component: httpVueLoader('./component/c_ticket.vue')},
				{ path: '/adTicket', component: httpVueLoader('./component/c_adTicket.vue')}
			]
		})
////////////////////////////
	//定义组件
	Vue.use(httpVueLoader);
		new Vue({
			el : '#app',
			router,
			data : function (){
				return { visible : false }
			},
			components : {
				//将组件加入组件库
				'c_header' : 'url:./component/c_header.vue',
				'c_menu' :	'url:./component/c_menu.vue',
				'c_footer' : 'url:./component/c_footer.vue'
			}
		})
////////////////////////////
</script>
<style type="text/css">
	body,ul,li,a{
		text-decoration:none;
		list-style:none;
		padding:0px;
		margin:0px;
	}
	.body{
		width:auto;
		height:800px;
	}
</style>
</html>
